package com.design.cjm.creational.singleton.example3;

/**
 * @Author: Jie Ming Chen
 * @Date: 2018/9/27
 * @Version 1.0
 */
public class Singleton {

    private static Singleton singleton = null;

    public static synchronized Singleton getSingleton() {
        if (singleton == null) {
            return new Singleton();
        }
        return singleton;
    }

    private Singleton() {
    }
}
